package com.cy.mall.dao.mapper.order;

import com.cy.mall.model.dto.message.OrderStatusNotificationMessageDTO;
import com.cy.mall.model.dto.order.RepaymentRemindDTO;
import com.cy.mall.model.query.order.OrderListQuery;
import com.cy.mall.model.vo.order.OrderDetailVO;
import com.cy.mall.model.vo.order.OrderListVO;
import org.apache.ibatis.annotations.Mapper;

import com.cy.mall.model.domain.order.Order;
import com.cy.mall.model.vo.order.OrderAddInfoDisplayVO;

import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * 订单 OrderMapper
 *
 * @author tanyilin
 *
 * @create 2019年2月25日 下午2:37:07
 */
@Mapper
public interface OrderMapper extends BaseMapper<Order> {

	/**
	 * 查询新增订单回显信息字段
	 * 
	 * @param orderId
	 * @return
	 */
	OrderAddInfoDisplayVO selectOrderAddInfoDisplayVO(Long orderId);
	
    int selectOrderListCount(OrderListQuery query);

	List<OrderListVO> selectOrderList(OrderListQuery query);

	/**
	 * 前台-订单详情
	 * @param orderId
	 * @return com.cy.mall.model.vo.order.OrderDetailVO
	 */
	OrderDetailVO selectOrderDetailVO(Long orderId);

	/**
	 * 通过 thirdLoanId 查询 发送 订单状态通知消息 需要的字段信息
	 * @param thirdLoanId
	 * @return com.cy.mall.model.dto.message.OrderStatusNotificationMessageDTO
	 */
    OrderStatusNotificationMessageDTO selectOrderStatusNotificationMessageDTO(@Param("thirdLoanId") String thirdLoanId);

    /**
     * 查询处于'还款中'的订单信息
     * @param
     * @return java.util.List<com.cy.mall.model.dto.order.RepaymentRemindDTO>
     */
    List<RepaymentRemindDTO> selectRepaymentRemindDTO();
}
